home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-04-10 | 3.5 KB | 75 lines | [TEXT/MPS ] |
- Some new stuff and some cool ideas:
-
- If you are familiar with previous versions of Dynamo, you will see that a
- number of things have changed and have been reorganized. The structure is
- more conducive to multiple-project development. Since Dynamo is localized
- and the include files are available to AsmIIGS just like other include files,
- Dynamo version control is easier. It is no longer so tempting to make a
- simple custom change to the Dynamo run-time for just one application, and
- therefore end up with multiple versions of Dynamo for different projects.
-
- Another big change is that the source code for BUILDAPP.SYSTEM is now
- included. This is so that extensions in the application build and launch
- process can be done by others to better suit their needs. Currently,
- BUILDAPP.SYSTEM simply moves the code to the bank and memory location
- described in the build script. Some more complex methods might be needed
- for more complex applications. An application may need overlays, for
- example. There may be two blocks of code that actually need to run at
- the same location, just at different times. A revised BUILDAPP.SYSTEM
- could put these so-designated segments in auxiliary memory, and then the
- application could move them to main memory when needed.
-
- For example: Here is a simple idea for an overlay system:
-
- BUILDAPP.SYSTEM could move designated files to aux ram when it is moving
- segments around at application launch time. This could even be done by
- using ProDOS to save the range of memory to /RAM5. When the main
- application needs the code segment, it could simply use ProDOS to load it
- into main memory.
-
- Here's a reasonably simple approach to overlays: When you want to call
- a segment of code that may or may not be in main memory, do a JSR to
- an overlay management routine. (Dynamic segments kind of work this way
- on the IIGS.) The code would look something like:
-
- sec ;Input for overlay code.
- lda value ;Input for overlay code.
- ldy value+1 ;Input for overlay code.
- ldx mode ;Input for overlay code.
-
- jsr overlay
- dc.b jiffyCoolCode ;Segment # we want to call.
-
- The overlay manager would first save the registers and processor status.
- Then it would use the return address on the stack to figure out where the
- jiffyCoolCode segment number is in memory. It would then get this byte
- from memory. Once this is done, the return address would be incremented
- by 1 and pushed back onto the stack.
-
- Now that we have the overlay segment #, we would use this to load the
- segment from /RAM5. Once it is loaded, the registers and processor status
- would be put back to what they were when the overlay manager was called.
- Once this is done, the overlay manager would jump to where the code was
- loaded.
-
- A little more logic could be added to see if the code segment requested
- is already in main memory. (Old segment # = requested segment #.) If
- it is, then the loading of the code could be skipped.
-
- As you can see, doing overlays isn't so tough after all. A simple
- system like this can really free up a lot of main ram on an Apple II.
-
- For more readability, a macro could be used to call the overlay code.
- The call might look like:
-
- _jsr jiffyCoolCode
-
- The macro would expand to the calling convention shown above.
-
- Any rate, given that BUILDAPP.SYSTEM isn't the final solution for
- everybody, I supplied the code so that everybody could change it
- if they wanted to.
-
-
- Eric Soldan, Apple II DTS
-